///////////////////////////////////////////////////////////
//  IRenderer.as
//  Actionscript 3.0 implementation of Interface IRenderer
//  owner: http://www.imanit.com/
//  resource page: http://www.scuge.com/ 
//  For Game Architecture or Flash Team Management Consulting contact iman@imanit.com
//  This code is without warranty and is to be used at your own risk.
//  Created on:      06-Dec-2009 5:02:46 PM
//  Original author: iMAN
///////////////////////////////////////////////////////////

package org.gof.display
{
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	
	import org.gof.display.IDisplayData;
		import org.gof.display.IGODisplayPosition;
	
	/**
	 * Interface for Renderer.  Renderer renders each game object that implements
	 * "displayable".  If the object also implements "stateDisplay" then the
	 * calculateDisplayState function will be called before rendering so the
	 * displayObject can be manipulated.
	 * @author iMAN
	 * @version 1.0
	 * @created 06-Dec-2009 5:02:46 PM
	 */
	public interface IRenderer
	{
		/**
		 * Renders scene, returning Display Data Container
		 * @param CameraGO    CameraGO
		 */
		function render(): void;

		/**
		 * adds a game object at a specific index.  add Game Object is called once, then
		 * updatePosition is called on the game object.
		 * @param go
		 * @param index    index
		 * 
		 * @param name
		 * @param position
		 * @param initialDisplayData
		 */
		function addObject(name:String, position:IGODisplayPosition, initialDisplayData:IDisplayData):Object

		/**
		 * updates position of Display Object with new position.
		 * @param goID    goID
		 * 
		 * @param newPosition    new position for game object.
		 * @param displayData
		 */
		function updatePosition(newPosition:IGODisplayPosition, index:uint): void;

		/**
		 * constructor
		 * 
		 * @param rootContainer    root display data container
		 * @param assetLibrary    assetLibrary
		 */
		function IRenderer(rootContainer:DisplayObjectContainer): void;

		/**
		 * returns root container for display engine.
		 */
		function get rootContainer():DisplayObjectContainer;

		/**
		 * removes all display objects and frees memory.
		 */
		function disposeAllObjects(): void;
	}//end IRenderer

}